package com.wcr.day03.Test3;
//案例需求 定义猫类(Cat)和狗类(Dog)
//
//猫类成员方法：eat（猫吃鱼）drink（喝水…）
// 狗类成员方法：eat（狗吃肉）drink（喝水…）
public abstract class Animal {

    private String name;
    private int age;

    public Animal(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public Animal() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void drink() {
        System.out.println("喝水");

    }


    public abstract void eat();
}
